﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model;
namespace Test
{
    public class Program
    {
        static void Main(string[] args)
        {
            string answer = "";
            do
            {
                Console.WriteLine("*****************欢迎使用学生社团管理系统********************");
                Console.WriteLine(">>社员管理                                                   ");
                Console.WriteLine("                 1.添加社员                                  ");
                Console.WriteLine("                 2.社员列表                                  ");
                Console.WriteLine("                 3.社员查询                                  ");
                Console.WriteLine("                 4.修改社员                                  ");
                Console.WriteLine("                 5.删除社员                                  ");
                Console.WriteLine("*************************************************************");

                Console.Write("请选择（1-5）");
                MemberManageTest mmobj = new MemberManageTest();
                string choice = Console.ReadLine();
                ClubMember cm = new ClubMember("18623405", "张德鑫", "男", Convert.ToDateTime("2001-4-8"),"2018",2,3,1,"3456543000","13876765654","zxm.jpg","打球","一级运动员");
                switch (choice) {
                    case "1":mmobj.AddMember(cm); break;
                    case "2":mmobj.GetALLMember(1); break;
                    case "3":mmobj.GetMemberByID("18623405"); break;
                    case "4":mmobj.UpdateMember(cm); break;
                    case "5":mmobj.DeleteMember("18623405"); break;
                    default:Console.WriteLine("输入错误！"); break;
                }
                Console.WriteLine("继续吗？（N/Y）");
                answer = Console.ReadLine();
                while (answer != "Y" && answer != "N") {
                    Console.WriteLine("输入有误请重新输入！");
                    answer = Console.ReadLine();
                }
            } while (answer == "Y");
            Console.ReadKey();
        }
    }
}
